<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Default Filesystem Disk
    |--------------------------------------------------------------------------
    |
    | Here you may specify the default filesystem disk that should be used
    | by the framework. The "local" disk, as well as a variety of cloud
    | based disks are available to your application. Just store away!
    |
    */

    'default' => env('FILESYSTEM_DISK', 'local'),

    /*
    |--------------------------------------------------------------------------
    | Filesystem Disks
    |--------------------------------------------------------------------------
    |
    | Here you may configure as many filesystem "disks" as you wish, and you
    | may even configure multiple disks of the same driver. Defaults have
    | been set up for each driver as an example of the required values.
    |
    | Supported Drivers: "local", "ftp", "sftp", "s3"
    |
    */

    'disks' => [

        'local' => [
            'driver' => 'local',
            'root' => storage_path('app'),
            'throw' => false,
        ],

        'public' => [
            'driver' => 'local',
            'root' => storage_path('app/public'),
            'url' => env('APP_URL').'/storage',
            'visibility' => 'public',
            'throw' => false,
        ],

        's3' => [
            'driver' => 's3',
            'key' => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'region' => env('AWS_DEFAULT_REGION'),
            'bucket' => env('AWS_BUCKET'),
            'url' => env('AWS_URL'),
            'endpoint' => env('AWS_ENDPOINT'),
            'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
            'throw' => false,
        ],
        'qiniu' => [
            'driver' => 'qiniu',
            'root' => '', // 设置上传时根前缀
            'access_key' => env('QINIU_ACCESS_KEY'),
            'secret_key' => env('QINIU_SECRET_KEY'),
            'bucket' => env('QINIU_BUCKET'),
            'domain' => env('QINIU_DOMAIN'),
            'upload_domain' => env('QINIU_UPLOAD_DOMAIN'),
            'region' =>env( 'QINIU_REGION'),
            'endpoint' => env('QINIU_ENDPOINT'), // 使用 ssl 这里设置如: https://oss-cn-beijing.aliyuncs.com
            'isCName' => env('OSS_IS_CNAME', false),
            'protocol' => env('QINIU_SECURE_URL', false) ? 'https' : 'http',
        ],
        'tos_s3' => [
            'driver' =>'s3',
            'root' => '',
            'key' => env('HUOSHAN_AK'),
            'secret' =>env('HUOSHAN_SK'),
            'bucket' => env('HUOSHAN_BUCKET'),
            'region' => env('HUOSHAN_REGION'),
            'endpoint' => env('HUOSHAN_ENDPOINT'),
            'domain' => env('HUOSHAN_DOMAIN'),
            'use_path_style_endpoint' => false, // 根据实际情况设置
        ],
        'oss' => [
            'driver' => 'oss',
            'root' => '', // 设置上传时根前缀
            'access_key' => env('OSS_ACCESS_KEY'),
            'secret_key' => env('OSS_SECRET_KEY'),
            'endpoint' => env('OSS_ENDPOINT'), // 使用 ssl 这里设置如: https://oss-cn-beijing.aliyuncs.com
            'bucket' => env('OSS_BUCKET'),
            'isCName' => env('OSS_IS_CNAME', false), // 如果 isCname 为 false，endpoint 应配置 oss 提供的域名如：`oss-cn-beijing.aliyuncs.com`，否则为自定义域名，，cname 或 cdn 请自行到阿里 oss 后台配置并绑定 bucket
            // 如果有更多的 bucket 需要切换，就添加所有bucket，默认的 bucket 填写到上面，不要加到 buckets 中
            'public_url' => env('OSS_PUBLIC_URL'),
            'internal_url' => env('OSS_INTERNAL_URL'),
            'endpoint_internal' => env('OSS_ENDPOINT_INTERNAL'),
            'buckets' => [
                'test' => [
                    'access_key' => env('OSS_ACCESS_KEY'),
                    'secret_key' => env('OSS_SECRET_KEY'),
                    'bucket' => env('OSS_TEST_BUCKET'),
                    'endpoint' => env('OSS_TEST_ENDPOINT'),
                    'isCName' => env('OSS_TEST_IS_CNAME', false),
                ],
            ],
        ],

        'download_temp' => [
            'driver' => 'local',
            'root' => str_replace('\\', '/', storage_path('app') . '/download_temp/'),
            'throw' => false,
        ],

        'excel_temp' => [
            'driver' => 'local',
            'root' => str_replace('\\', '/', storage_path('app') . '/excel_temp/'),
            'throw' => false,
        ],

        'cert' => [
            'driver' => 'local',
            'root' => str_replace('\\', '/', storage_path('app') . '/cert/'),
            'throw' => false,
        ],

        'figures_video_temp' => [
            'driver' => 'local',
            'root' => str_replace('\\', '/', storage_path('app') . '/figures_video_temp/'),
            'throw' => false,
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Symbolic Links
    |--------------------------------------------------------------------------
    |
    | Here you may configure the symbolic links that will be created when the
    | `storage:link` Artisan command is executed. The array keys should be
    | the locations of the links and the values should be their targets.
    |
    */

    'links' => [
        public_path('storage') => storage_path('app/public'),
    ],

];
